import request from '@/utils/request'
//获取商品详情数据
export const getProDetails = (goodsId) => {
    return request.get('/goods/detail', {
        params: {
            goodsId
        }
    })
}
//获取商品保障服务数据  
export const getProService = (goodsId) => {
    return request.get('/goods.service/list', {
        params: {
            goodsId
        }
    })
}
//获取商品评价数据
export const getProEvaluate = (goodsId, limit = 5) => {
    return request.get('/comment/listRows', {
        params: {
            goodsId,
            limit
        }
    })
}
//添加购物车数据
export const addCart = (goodsId, goodsNum) => {
    console.log('添加购物车函数被调用')
    console.log(goodsId, goodsNum)
    return request.post('/cart/add', {
        goodsId,
        goodsNum,
        "goodsSkuId": 0

    }
    )
}